//part1:C05:ex5.25.cpp
#include <iostream>
#include <stdexcept>

int main(void) {
    using namespace std;
    cout << "Enter divide and divided integer:\n";
    int v1, v2;
    while (cin >> v1 >> v2) {
        try {
            if (v2 == 0) {
               throw runtime_error("divided not zero!Wrong!\n");
            }
            cout << "v1 / v2 is : " << v1 / v2 << endl;
        } catch (runtime_error err) {
            cout << err.what() << endl;
            cout << "continue? (y or n)";
            char ch;
            cin >> ch;
            if (ch != 'y' && ch != 'Y'){
               break;
            }
        }
    }

    return 0;
}
